<?php
/**用于处理添加、编辑、删除前置任务内容
 * @author wuguowen, Mar. 03 2005
 */
require_once("../../includes/config.inc.php");

//定义工作任务表的变量

$iTaskID    = fn_getParam("intTaskID",0);		//工作分解结构的记录ID
$sAction    = fn_getParam("strAction");			//动作，是添加记录还是修改记录
$iID        = fn_getParam("intID",0);			//前置任务记录的ID
$sFromWhere  = fn_getParam("strFromWhere");

if (($sAction==ACTION_DELETE) and $iID==0) 
{
	$sResult = "<font color='red'>".$messages["apps.wbs.resAction.key006"]."</font>";
} 
else if($sAction == ACTION_DELETE)
{
		$sql = "Delete From $TABLE_PRETASKLIST Where ID=$iID";
		$DB->query($sql);
		echo "<script language='javascript'>location.href='wbs.php?strFromWhere=".$sFromWhere."&strTab=PreTaskTab&&strAction=UPDATE&&intTaskID=".$iTaskID."'</script>";
}
	
$DB->close();

fn_printHeader();
?>

<?php fn_printFooter();?>
